home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_sol_ambswitch5.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  91 lines

  1. # Jones 3D Cog Script
  2. #
  3. # SOL_AmbSwitch4.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.  
  12.     message     startup
  13.     message        entered
  14.     message     pulse
  15.  
  16.     thing        soundPos0        nolink
  17.     thing        soundPos1        nolink
  18.     thing        soundPos2        nolink
  19.     thing        soundPos3        nolink
  20.     thing        soundPos4        nolink
  21.     
  22.     sector      on_sec1         linkID=1
  23.     sector      on_sec2         linkID=1
  24.     
  25.     sector      off_sec1        linkID=0
  26.     sector      off_sec2        linkID=0
  27.  
  28.     sound        enhanced0=sol_ambient01_a.wav   local
  29.     sound        enhanced1=sol_ambient02_a.wav   local
  30.     sound        enhanced2=sol_ambient03_a.wav   local
  31.     sound        enhanced3=sol_ambient04_a.wav   local
  32.     sound        enhanced4=sol_ambient05_a.wav   local
  33.     sound        enhanced5=nub_ambient4_a.wav    local
  34.     
  35.     sound       basic0=nub_ambient1_a.wav   local
  36.     sound       basic1=nub_ambient2_a.wav   local
  37.     sound       basic2=nub_ambient3_a.wav   local
  38.     
  39.     int            sndNum            local
  40.     int            numPos=4        local
  41.     int            count           local
  42.  
  43. end
  44.  
  45. # ========================================================================================
  46.  
  47. code
  48.  
  49. startup:
  50.  
  51.     global4 = 0;
  52.     return;
  53.  
  54. # ========================================================================================
  55.  
  56. entered:
  57.  
  58.     if(GetSenderID() == 1)
  59.     {
  60.         setpulse(2.0);
  61.     }
  62.     
  63.     if(GetSenderID() == 0)
  64.     {
  65.         SetPulse(0.0);
  66.     }
  67.     
  68.     return;
  69.  
  70. # ========================================================================================
  71.  
  72. pulse:
  73.  
  74.     # no commies yet
  75.     if(global4 == 0)
  76.     {
  77.         PlaySoundThing(basic0[RandBetween(0, 2)], soundPos0[RandBetween(0, 4)], 1.0, -1, -1, 0);
  78.     }
  79.     
  80.     # commies are driving around
  81.     else if(global4 == 1)
  82.     {
  83.         PlaySoundThing(enhanced0[RandBetween(0, 5)], soundPos0[RandBetween(0, 4)], 1.0, -1, -1, 0);
  84.     }
  85.     
  86.     return;
  87.  
  88. # ========================================================================================
  89.  
  90. end
  91.